package com.supor.aiot.common.entity;

/**
 * ---------------------------------------------------------------- <br>
 * Copyright (C) 2014-2020, by het, Shenzhen, All rights reserved.  <br>
 * ---------------------------------------------------------------- <br>
 * <p>
 *          "wifiWarning": false,
 * 			"weightWarning": false,
 * 			"wronglidWarning": false,
 * 			"pbWarning": false,
 * 			"lidWarning": false,
 * 			"bottomWarning": false,
 * 			"topWarning": false,
 *
 * 			"lidStatus": 1,
 * 			"powerScale": 0,
 * 			"realPressureValue": 0,
 * 			"realBladeStatus": 0,
 * 			"powerOnTotalTime": 0,
 * 			"lightTotalTime": 0,
 * 			"relayActionCount": 0,
 * 			"innerIOCount": 0,
 * 描述: 主厨机协议 <br>
 * 作者: lei <br>
 * 日期: 2021/7/16 <br>
 */
public class ChiefMachineData extends BaseDeviceData {
    /**
     * 上位机显示： 0 待机；1 预约；2 保温；3 烹饪中； 4 烹饪结束保温；5 已经完成 6-10 预留；
     */
    public int machineStatus;
    /**
     * 烹饪模式:
     * 当contextState == 1,2，3,4 时
     * 非压力煮，只有工作中，已完成状态
     * xxx00001：翻炒
     * xxx00011：慢炖
     * xxx00100：低温烹饪
     * xxx00101：顶置烘烤
     * xxx01010：无压煮、烹煮
     * xxx01011：开盖收汁
     * xxx01100：焯水
     * xxx01101：蒸
     *
     * 压力煮，具备升压中，保压中，排气中，已经完成状态
     * xxx00010：压力煮
     * xxx00110：无水焗
     * xxx00111：保温
     * xxx01000：煮饭
     * xxx01001：煮粥
     *
     * bit7, bit6， bit5表示进行中状态：
     * 000：升压中/工作中
     * 001：保压中
     * 010：排气中
     * 011：已经完成
     */
    public int workStatus;


    /**
     * 盖子状态: 0：玻璃盖或蒸格盖|1：压力盖|2：烘烤盖
     */
    public int lidStatus;
    /**
     * 火力: 1：小火 2：中火  3：大火
     */
    public int powerScale;
    /**
     * 实时压力值: 当前设备实时压力值
     */
    public int realPressureValue;
    /**
     * 当前实时搅拌状态: 0：无搅拌|1：慢搅|2：中速|3：高速
     */
    public int realBladeStatus;
    /**
     * 通电累计工作时长: 整机带电时长累计
     */
    public int powerOnTotalTime;
    /**
     * TFT累计点亮时长: TFT点亮时长累计
     */
    public int lightTotalTime;
    /**
     * 继电器动作次数: 继电器开、关都+1
     */
    public int relayActionCount;
    /**
     * 烹饪次数: 离线食谱和每日食谱中的食谱，每次执行烹饪+1
     */
    public int innerIOCount;

    /**
     * WIFI通信故障
     */
    public boolean wifiWarning;
    /**
     * 称重传感器故障
     */
    public boolean weightWarning;
    /**
     * 用错盖子
     */
    public boolean wronglidWarning;
    /**
     * PB通讯故障
     */
    public boolean pbWarning;
    /**
     * 开合盖
     */
    public boolean lidWarning;
    /**
     * 底部传感器
     */
    public boolean bottomWarning;
    /**
     * 顶部传感器
     */
    public boolean topWarning;

    @Override
    public String toString() {
        return "ChiefMachineData{" +
                "machineStatus=" + machineStatus +
                // ", workStatus='" + workStatus + '\'' +
                ", lidStatus=" + lidStatus +
                ", powerScale=" + powerScale +
                ", realPressureValue=" + realPressureValue +
                ", realBladeStatus=" + realBladeStatus +
                ", powerOnTotalTime=" + powerOnTotalTime +
                ", lightTotalTime=" + lightTotalTime +
                ", relayActionCount=" + relayActionCount +
                ", innerIOCount=" + innerIOCount +
                ", wifiWarning=" + wifiWarning +
                ", weightWarning=" + weightWarning +
                ", wronglidWarning=" + wronglidWarning +
                ", pbWarning=" + pbWarning +
                ", lidWarning=" + lidWarning +
                ", bottomWarning=" + bottomWarning +
                ", topWarning=" + topWarning +
                ", productType='" + productType + '\'' +
                ", productModel='" + productModel + '\'' +
                ", wifiType=" + wifiType +
                // ", antiCollusionCode='" + antiCollusionCode + '\'' +
                ", onOffStatus=" + onOffStatus +
                ", netDbm=" + netDbm +
                // ", ip='" + ip + '\'' +
                ", dailyRecipesCnt=" + dailyRecipesCnt +
                ", machineVer=" + machineVer +
                ", productID='" + productID + '\'' +
                ", childLock=" + childLock +
                ", busyFlag=" + busyFlag +
                // ", machineSavedRecipesID=" + Arrays.toString(machineSavedRecipesID) +
                // ", recipeID=" + recipeID +
                ", recipeName='" + recipeName + '\'' +
                ", recipeStepNum=" + recipeStepNum +
                ", totalRecipeStepNum=" + totalRecipeStepNum +
                ", contextState=" + contextState +
                ", setTempValue=" + setTempValue +
                ", realTempValue=" + realTempValue +
                ", workTime=" + workTime +
                // ", r1='" + r1 + '\'' +
                // ", r2='" + r2 + '\'' +
                // ", r3='" + r3 + '\'' +
                '}';
    }
}
